body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(74, 85, 104, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 80px;
    width: 700px;
    background: #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-size: 16px;
}

.header-img {
    height: 80px;
    width: 120px;
    background: #a0aec0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-title {
    text-align: center;
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.upload-section, .analysis-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: rgba(247, 250, 252, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-area:hover {
    border-color: #a0aec0;
    background: rgba(247, 250, 252, 0.8);
}

.upload-icon {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #667eea;
    transform: scale(1.1);
}

.upload-text {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 10px;
}

.upload-hint {
    color: #718096;
    font-size: 14px;
}

.file-input {
    display: none;
}

.image-preview {
    display: none;
    margin: 20px 0;
    text-align: center;
}

.preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.preview-img:hover {
    transform: scale(1.05);
}

.image-info {
    background: rgba(247, 250, 252, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-label {
    color: #4a5568;
    font-weight: 500;
}

.info-value {
    color: #2d3748;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.analysis-placeholder {
    text-align: center;
    color: #718096;
    padding: 60px 20px;
    font-size: 16px;
}

.analysis-result {
    display: none;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.result-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-content {
    color: #4a5568;
    line-height: 1.6;
}

.risk-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.risk-low {
    background: #c6f6d5;
    color: #2f855a;
}

.risk-medium {
    background: #fef5e7;
    color: #dd6b20;
}

.risk-high {
    background: #fed7d7;
    color: #c53030;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #c53030;
    display: none;
}

.success-message {
    background: #c6f6d5;
    color: #2f855a;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #2f855a;
    display: none;
}

/* 覆盖上传界面的样式 */
.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.upload-overlay.active {
    display: flex;
}

.uploaded-preview {
    text-align: center;
    padding: 20px;
}

.uploaded-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
}

.uploaded-info {
    background: rgba(247, 250, 252, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    text-align: left;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .upload-section, .analysis-section {
        padding: 20px;
    }

    .upload-area {
        padding: 30px 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

    .header-logo {
        width: 100%;
        height: 60px;
    }

    .header-img {
        width: 100px;
        height: 60px;
    }
}
